package com.teame.readbaby.parser;

import java.util.List;

import org.json.JSONException;

import com.alibaba.fastjson.JSONObject;

import com.teame.readbaby.vo.TopicListInfo;

public class TopicListParser extends BaseParser<List<TopicListInfo>> {

	@Override
	public List<TopicListInfo> parseJSON(String paramString) throws JSONException {
		String result = checkResponse(paramString);
		if (result == null) {
			return null;
		}

		JSONObject jsonObject = JSONObject.parseObject(paramString);
		String jsontopiclist = jsonObject.getString("topic");

		List<TopicListInfo> topicList = JSONObject.parseArray(jsontopiclist, TopicListInfo.class);
		return topicList;
	}

}
